package cn.yesway.common.listener;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 系统监控类 实现加载配置文件
 */
public class InitListener implements ServletContextListener {
	private static final Logger log = LoggerFactory.getLogger(InitListener.class);

	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	public void contextDestroyed(ServletContextEvent arg0) {
		log.info("【系统关闭，当前系统时间：" + df.format(new Date()) + "】");
	}

	public void contextInitialized(ServletContextEvent arg0) {
		log.info("【系统启动，当前系统时间：" + df.format(new Date()) + "】");
	}
}
